package triangle;

import static org.junit.Assert.*;
import org.junit.Test;

public class TriangleTest {

		Triangle equilateral_triangle = new Triangle(1.0,3.0,3.0);
		Triangle scalene_triangle = new Triangle (5.0,6.0,7.0);
		Triangle right_triangle = new Triangle(3.0,4.0,5.0);
		Triangle isoceles_triangle = new Triangle(3.0,3.0,4.0);
		
		
		// Testing whether all the triangles made above pass the isTriangle test.
		@Test
		public void isTriangle() {
			assertTrue(isoceles_triangle.isTriangle());
			assertTrue(scalene_triangle.isTriangle());
			assertTrue(equilateral_triangle.isTriangle());
			assertTrue(right_triangle.isTriangle());
		}
	
		// The following 4 tests are using the corresponding triangle types made above.
		@Test
		public void isRightTriangle() {
			assertTrue(right_triangle.isRightTriangle());
		}
		
		@Test
		public void isIsocelesTriangle() {
			assertTrue(isoceles_triangle.isIsocelesTriangle());
		}
		
		@Test
		public void isScaleneTriangle() {
			assertTrue(scalene_triangle.isScaleneTriangle());
		}
		
		@Test
		public void isEquilateralTriangle() {
			assertTrue(equilateral_triangle.isEquilateralTriangle());
		}

	}

